package com.ws.gold.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ws.gold.config.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author ws
 * @create 2025/6/27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("warehouse_hold_situation")
public class WarehouseHoldSituation extends BaseEntity {

    //买入/卖出时间
    @TableField("buy_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime buyTime;

    //买入/卖出价格
    @TableField("buy_real_price")
    private Double buyRealPrice;

    //持仓数量(克)
    @TableField("hold_num")
    private Double holdNum;

    //持仓金额
    @TableField("hold_amount")
    private Double holdAmount;

    //持仓利润
    @TableField("hold_profit")
    private Double holdProfit;

    //持仓利润率
    @TableField("hold_profit_rate")
    private Double holdProfitRate;

    //持仓成本价
    @TableField("hold_cost_price")
    private Double holdCostPrice;

    //持仓均价
    @TableField("hold_cost_price_avg")
    private Double holdCostPriceAvg;

}
